
<%@ page import="mms.RestaurantCompany" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="bubble" />
        <g:set var="entityName" value="${message(code: 'restaurantCompany.label', default: 'restaurantCompany')}" />
        <title><g:message code="default.show.label" args="[entityName]" /></title>

        <g:javascript library="jquery"/> 
        <js:fancybox/>


<script type="text/javascript">
<!--

	$(document).ready(function() {
			/*
			*   Examples - images
			*/ 
			$("a[rel=group]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">图片 ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			}); 
		});
    function openlog(){ 
        window.open("/inspectionLog/bubble/${medicineCompanyInstance.id}", 'newwindow', 
        'height=600, width=800, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=yes,location=yes, status=yes') ;
     }

    function liveopen(){
//        window.showModalDialog("/company/live/${restaurantCompanyInstance.id}",live,
//        "dialogheight:330px;dialogwidth:420px;status:no;toolbar:no;menubar:no;scrollbars:no;resizable:no");   

         window.open ("/company/live/${restaurantCompanyInstance.id}", 'newwindow', 
        'height=330, width=420, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=yes,location=no, status=no') ;
     }

     function realopen(){
//        window.showModalDialog("/restaurantCompany/realdata/${restaurantCompanyInstance.id}",live,
//        "dialogheight:330px;dialogwidth:420px;status:no;toolbar:no;menubar:no;scrollbars:no;resizable:no");   
        window.open ("/restaurantCompany/realdata/${restaurantCompanyInstance.id}", 'newwindow', 
        'height=300, width=520, top=0, left=0, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no') ;

    }
//-->
</script>
   
    </head>
    <body>
  
        <div class="body">
            
         
            <div class="dialog">
                <table>
                    <tbody> 
                    
                        <tr class="prop">
                             
                            <td valign="top" colspan="2" style="text-align : center"> <h1>${fieldValue(bean: restaurantCompanyInstance, field: "name")}</h1>
                            
                            </td> 
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="restaurantCompany.address.label" default="Address" />:</td>
                            <td valign="top" class="value">${fieldValue(bean: restaurantCompanyInstance, field: "address")}</td>
                        </tr> 
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="restaurantCompany.contact.label" default="Contact" />:</td>
                            <td valign="top" class="value">${fieldValue(bean: restaurantCompanyInstance, field: "contact")}</td> 
                        </tr>
                       <g:if test="${restaurantCompanyInstance.level}">
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="restaurantCompany.level.label" default="Level" />:</td>
                            <td valign="top" class="value">${fieldValue(bean: restaurantCompanyInstance, field: "level")}</td>
                        </tr>
                        </g:if>

                        <g:if test="${restaurantCompanyInstance.incorporator}">
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="restaurantCompany.incorporator.label" default="incorporator" />:</td>
                            <td valign="top" class="value">${fieldValue(bean: restaurantCompanyInstance, field: "incorporator")}</td>
                        </tr>
                        </g:if>
                        <g:if test="${restaurantCompanyInstance.manager}">
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="restaurantCompany.manager.label" default="manager" />:</td>
                            <td valign="top" class="value">${fieldValue(bean: restaurantCompanyInstance, field: "manager")}</td>
                        </tr>
                        </g:if>
                    

                        <g:if test="${restaurantCompanyInstance.sanitationLicence}">
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="restaurantCompany.sanitationLicence.label" default="sanitationLicence" />:</td>
                            <td valign="top" class="value">${fieldValue(bean: restaurantCompanyInstance, field: "sanitationLicence")}</td>
                        </tr>
                        </g:if>

                        <g:if test="${restaurantCompanyInstance.sanitationLicenceIssue}">
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="restaurantCompany.sanitationLicenceIssue.label" default="sanitationLicenceIssue" />:</td>
                            <td valign="top" class="value">${fieldValue(bean: restaurantCompanyInstance, field: "sanitationLicenceIssue")}</td>
                        </tr>
                        </g:if>

                        <g:if test="${restaurantCompanyInstance.sanitationLicenceExpire}">
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="restaurantCompany.sanitationLicenceExpire.label" default="sanitationLicenceExpire" />:</td>
                            <td valign="top" class="value">${fieldValue(bean: restaurantCompanyInstance, field: "sanitationLicenceExpire")}</td>
                        </tr>
                        </g:if>

                        <g:if test="${restaurantCompanyInstance.area}">
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="restaurantCompany.area.label" default="area" />:</td>
                            <td valign="top" class="value">${fieldValue(bean: restaurantCompanyInstance, field: "area")}</td>
                        </tr>
                        </g:if>


                        <g:if test="${restaurantCompanyInstance.region}">
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="restaurantCompany.region.label" default="region" />:</td>
                            <td valign="top" class="value">${fieldValue(bean: restaurantCompanyInstance, field: "region")}</td>
                        </tr>
                        </g:if>

                        <g:if test="${restaurantCompanyInstance.categroy}">
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="restaurantCompany.categroy.label" default="categroy" />:</td>
                            <td valign="top" class="value">${fieldValue(bean: restaurantCompanyInstance, field: "categroy")}</td>
                        </tr>
                        </g:if>


                        <g:if test="${restaurantCompanyInstance.nature}">
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="restaurantCompany.nature.label" default="nature" />:</td>
                            <td valign="top" class="value">${fieldValue(bean: restaurantCompanyInstance, field: "nature")}</td>
                        </tr>
                        </g:if>

                        <g:if test="${restaurantCompanyInstance.scopeOfBusiness}">
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="restaurantCompany.scopeOfBusiness.label" default="scopeOfBusiness" />:</td>
                            <td valign="top" class="value">${fieldValue(bean: restaurantCompanyInstance, field: "scopeOfBusiness")}</td>
                        </tr>
                        </g:if>


                        <g:if test="${restaurantCompanyInstance.employees}">
                        <g:each in="${restaurantCompanyInstance.employees}" var="employee">
                        
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="restaurantCompany.employees.label" default="employees" />:</td>
                            <td valign="top" class="value">${employee}</td>
                        </tr>
                        </g:each>
                        </g:if>
                        <g:if test="${restaurantCompanyInstance.history}">
                        <g:each in="${restaurantCompanyInstance.history}" var="historyInc">
                        
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="restaurantCompany.history.label" default="history" />:</td>
                            <td valign="top" class="value">${historyInc}</td>
                        </tr>
                        </g:each>
                        </g:if>

                        <g:if test="${restaurantCompanyInstance.improper}">
                        <g:each in="${restaurantCompanyInstance.improper}" var="improperInc">
                        
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="restaurantCompany.improper.label" default="improper" />:</td>
                            <td valign="top" class="value">${improperInc}</td>
                        </tr>
                        </g:each>
                        </g:if>
  
                       <tr class="prop">
                            <td valign="top"  colspan="2"><br>
                                
                                 <g:each in="${restaurantCompanyInstance.multimedia?.findAll{it.mediaType=='picture'}}" var="m"> 
								     <div class="picture">
                                            <a rel="group"  href="${m.url}?t=t.jpg"> 
                                            <img src="${m.url}" border=0 alt="img" >
                                         </a> 
                                        </div>
                                   
                                </g:each>
                              
                            </td>  
                        </tr>



                        <tr class="prop">
                            <td valign="top"  colspan="3"><br>
                                
                               <!-- 
                               <g:link controller="restaurantCompany" action="movie" id="${restaurantCompanyInstance.id}">视频资料</g:link>&nbsp;|&nbsp;
                               --->
                                <a herf="javascript:" onclick="realopen()" id="live">实时进销存数据</a>&nbsp;|&nbsp;
                                <a herf="javascript:" onclick="openlog()" id="live">3G移动检查纪录</a>&nbsp;|&nbsp;
                                <g:if test="${restaurantCompanyInstance.live}">
                                        <a herf="javascript:" onclick="liveopen()" id="live">监控视频</a>
                                </g:if>
                                <br><br>
                            </td>  
                        </tr>
 
                      
                     
                    </tbody>
                </table>
            </div>
        
        </div>
    </body>
</html>
